<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        
        div {
            width: 500px;
            height: 400px;
            border: 2px solid black;
            margin: auto;
            /* 形成弹性盒子 */
            display: flex;
            /* 主轴 */
            justify-content: flex-end;
            justify-content: space-between;
            justify-content: space-around;
            justify-content: space-evenly;
            justify-content: center;
            /* 交叉轴 */
            align-items: stretch;
            align-items: flex-start;
            align-items: flex-end;
            align-items: center;
        }
        
        p {
            width: 100px;
            height: 100px;
        }
        
        p:nth-of-type(1) {
            background-color: pink;
        }
        
        p:nth-of-type(2) {
            background-color: green;
        }
        
        p:nth-of-type(3) {
            background-color: purple;
        }
    </style>
</head>

<body>
    <div>
        <p>1</p>
        <!-- <p>2</p>
        <p>3</p> -->
    </div>
</body>

</html>